<template>
	<view class="content">
		<view class="milk-station fcs">
			<view class="l fcc" @click="selectShow = true">
				<text class="t">金山奶站</text>
				<u-icon name="arrow-down"></u-icon>
			</view>
			<view class="r fcs">
				<u-notice-bar type="error" bg-color="#FFF" :is-circular="false" mode="horizontal" :list="list"
					style="width: 100%;" @click="toPath"></u-notice-bar>
			</view>
		</view>
		<view class="banner">
			<u-swiper height="450" :list="bannerList" @click="bannerClick"></u-swiper>
		</view>
		<view class="goods-list fcs">
			<view class="item" v-for="(item, index) in 10" :key="index" @click="toGoods(item)"> 
				<view class="img">
					<image class="img" src="https://img.js.design/assets/img/668c9ee084a543139ecb06cb.jpg#4daecb55af26b59c4ba5893a9ca94283" mode=""></image>
				</view>
				<view class="info fcs">
					<view class="l">
						葡萄味牛奶
					</view>
					<view class="r">
						<text class="i">
							￥
						</text>
						<text class="money">
							5元
						</text>
						<text class="u">
							/瓶
						</text>
					</view>
				</view>
			</view>
		</view>
		<view class="order-milk fcc">
			<view class="bc-btn-l fcc" @click="toGoods">
				<image class="img" src="@/static/img/milk.png" mode=""></image>
				<text class="t">我要订奶</text>
			</view>
		</view>
		
		<view class="suspension">
			<view class="item fcc">
				<image class="img" src="@/static/img/retransmission.png" mode="widthFix"></image>
			</view>
			<view class="item fcc" style="margin-top: 20rpx;" @click="service">
				<image class="img" src="@/static/img/phone.png" mode="widthFix"></image>
			</view>
		</view>
		
		<u-select v-model="selectShow" :list="selectlist" confirm-color="#F3060D"></u-select>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selectlist: [
					{
						value: '1',
						label: '奶站1'
					},
					{
						value: '2',
						label: '奶站2'
					}
				],
				selectShow: false,
				list: [
					'寒雨连江夜入吴',
					'平明送客楚山孤',
					'洛阳亲友如相问',
					'一片冰心在玉壶'
				],
				bannerList: [{
						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
						title: '昨夜星辰昨夜风，画楼西畔桂堂东'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
						title: '身无彩凤双飞翼，心有灵犀一点通'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
						title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
					}
				],
			}
		},
		onLoad() {

		},
		methods: {
			bannerClick() {
				uni.navigateTo({
					url: '/pages/banner-detail/banner-detail'
				})
			},
			service() {
				// uni.navigateTo({
				// 	url: '/pages/customer-service/customer-service'
				// })
				uni.makePhoneCall({
					phoneNumber: '111111' //仅为示例
				});
			},
			toPath() {
				uni.navigateTo({
					url: '/pages/announcements/announcements'
				})
			},
			toGoods(item) {
				uni.navigateTo({
					url: '/pages/goods-detail/goods-detail'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 21rpx 19rpx;
		box-sizing: border-box;
		.suspension {
			width: 70rpx;
			position: fixed;
			right: 20rpx;
			bottom: 135.78rpx;
			.item {
				width: 70rpx;
				height: 70rpx;
				border-radius: 50%;
				background-color: #FFF;
				box-shadow: 0px 4rpx 4rpx  #ccc;
				.img {
					width: 40rpx;
				}
			}
		}
		.order-milk {
			width: 100%;
			position: fixed;
			bottom: 55rpx;
			left: 0;
			.bc-btn-l {
				width: 440rpx;
				height: 110rpx;
				.t {
					font-size: 30rpx;
					font-weight: 500;
					color: #FFF;
					margin-left: 20rpx;
				}
				.img {
					width: 60rpx;
					height: 60rpx;
				}
			}
		}
		.goods-list {
			width: 100%;
			flex-wrap: wrap;
			margin-top: 20rpx;
			.item {
				width: 345rpx;
				height: 445rpx;
				margin-bottom: 20rpx;
				border-radius: 10rpx;
				overflow: hidden;
				.info {
					height: 100rpx;
					width: 100%;
					padding: 31rpx 19.2rpx;
					box-sizing: border-box;
					background-color: #FFF;
					.l {
						font-size: 26rpx;
						font-weight: 500;
					}
					.r {
						.i {
							font-size: 18rpx;
							color: #F3060D;
						}
						.money {
							font-size: 26rpx;
							color: #F3060D;
						}
						.u {
							font-size: 18rpx;
							color: #383838;
						}
					}
				}
				.img {
					width: 345rpx;
					height: 345rpx;
				}
			}
		}

		.banner {
			margin-top: 21rpx;
		}

		.milk-station {
			.r {
				width: calc(100% - 240rpx - 21rpx);
				border-radius: 32rpx;
				background: #FFFFFF;
				overflow: hidden;

				::v-deep .u-news-item {
					color: #666;
					font-size: 28rpx;
				}
			}

			.l {
				width: 240rpx;
				height: 64rpx;
				border-radius: 32px;
				background: #FFFFFF;
				margin-right: 21rpx;

				.t {
					margin-right: 15px;
				}
			}
		}

	}
</style>